this.sensitive = sensitive;
this.actor.reactive = sensitive;
+ this.actor.can_focus = sensitive;
this.emit('sensitive-changed', sensitive);
},
_init: function(state) {
this.actor = new St.Bin({ style_class: 'toggle-switch',
- accessible_role: Atk.Role.CHECK_BOX});
+ accessible_role: Atk.Role.CHECK_BOX,
+ can_focus: true });
// Translators: this MUST be either "toggle-switch-us"
// (for toggle switches containing the English words
// "ON" and "OFF") or "toggle-switch-intl" (for toggle
}));
}
- item.actor.reactive = action.enabled;
+ item.actor.reactive = item.actor.can_focus = action.enabled;
destroyId = item.connect('destroy', Lang.bind(this, function() {
item.disconnect(destroyId);
if (action.items.length) {
for (let i = 0; i < action.items.length; i++) {
let item = action.items[i];
- item.actor.reactive = action.enabled;
+ item.actor.reactive = item.actor.can_focus = action.enabled;
}
}
}